/**
 * Created by CN7817 on 2016/9/1.
 */

$(function(){

    //显示详情
    $(document).on(eventMap('click'),'.jczx_list li a',function (e){
        e.preventDefault();
        var message=$(this).attr('data-message');
        if(message!='') {
            layer.open({
                title: [
                    '记录详情',
                    'background-color:#46c1d6; color:#fff;'
                ],
                content: '<div style="padding: 5px"><span style="color: red">信息：</span>' + message + '</div>',
                shadeClose: true
            });
        }
        else{
            zk_alert_msg('对不起，此次记录结果无法分析');
        }
    });

    //指标服务切换
    $(document).on(eventMap('click'),'.zx_tab li a',function(e){
        e.preventDefault();
        $(this).parent().addClass('cur').siblings().removeClass('cur');
        $($(this).attr('data-div_id')).show().siblings('div').hide();
    })
});

var ajax_submit_recordes=function(data,url){
    $.ajax({
        type:'post',
        url:url,
        data:data,
        dataType:'json',
        beforeSend:function(){
            dataLoading();
        },
        success:function(res){

            zk_alert_msg(res.msg,2,function(){
                if(res.status==1){
                    location.replace(location.href);
                }
            });
            removeDataLoading();
        },
        complete:function(){
            removeDataLoading();
        }
    });

};
